package cn.bjit.service;

import cn.bjit.model.ProductMessage;
import cn.bjit.request.LockProductRequest;
import cn.bjit.util.JsonData;
import cn.bjit.vo.ProductVO;

import java.util.List;
import java.util.Map;

public interface ProductService {

    Map<String, Object> page(int page, int size);

    ProductVO findDetailById(long productId);

    //批量查询
    List<ProductVO> findProductByIdBatch(List<Long> productIdList);

    //商品库存锁定
    JsonData lockProductStock(LockProductRequest lockProductRequest);

    //释放商品库存
    boolean releaseProductStock(ProductMessage productMessage);
}
